package com.yingxin.yxerp.module.print.vo.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yingxin.yxerp.module.print.constant.PrintStatusConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 打印记录
 * </p>
 *
 * @author fanchao
 * @since 2022-02-19
 */

@Data
@ApiModel(value = "PrintRecordRespVo对象", description = "打印记录")
public class PrintRecordRespVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id ")
    private String id;

    @ApiModelProperty(value = "业务 id ")
    private String businessId;

    @ApiModelProperty(value = "业务类型 ")
    private String businessType;

    @ApiModelProperty(value = "业务 no ")
    private String businessNo;

    @ApiModelProperty(value = "打印人 id")
    private String printerId;

    @ApiModelProperty(value = "打印时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date printTime;

    //
    @ApiModelProperty(value = "打印人名称")
    private String printerName;

    private String printStatus;

    public String getPrintable() {
        return PrintStatusConst.PRINTABLE.equals(printStatus) ? "1" : "0";
    }

}